<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        #father{
            display: flex;
            height: 100vh;
        }
        #left{
            width: 100px;
            background-color: red;
        }
        #right{
            width: 100px;
            background-color: yellow;
            
        }
        #mid{
            flex:1;
            border: 1px black solid;
            background-color: blue;
        }

    </style>
</head>
<body>
    <div id="father">
        <div id="left"></div>
        <div id="mid"></div>
        <div id="right"></div>
    </div>
    <script>
        function throttle(func, delay) {
    var delay = delay || 1000;
    var previousDate = new Date();
    var previous = previousDate.getTime(); 
    
    return function(args) {
        var context = this;
        var nowDate = new Date();
        var now = nowDate.getTime();
        if (now - previous >= delay) {  
            func.call(context, args);  
            previous = now;
        }
    }
}
    </script>
</body>
</html>